<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>网易新闻</title>
    <style>
        .bok {
            width: 500px;
            margin-top: 50px;
            background-color: grey;

        }

        .top {
            display: flex;
            /*background-color: blue;*/
            justify-content: space-between;
            align-content:space-between;
          
        }

        .top-img img {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            line-height: 80px;
        }

        .top-zhong {
            width: 300px;
        }

        .top-right {
            width: 100px;
        }
        .bu-img img {
            width: 300px;
        }
        .top-right{
            line-height: 80px;
        }


    </style>
</head>
<body>
<div id="root">

    <div :key="v.docid" class="bok" v-for="(v,i) in arr">
        <div class="top">
            <div class="top-img"><img alt="" :src="v.imgsrc"></div>
            <div class="top-zhong"><h3>{{v.source}}</h3>
                <span>{{v.lmodify}}</span><span>{{v.source}}</span></div>
            <div class="top-right" >关注</div>
        </div>
        <h3>{{v.title}}</h3>
        <div class="content">{{v.digest}}</div>
        <div class="bu-img"><img
                :src="v.imgsrc"
                alt=""></div>
    </div>

</div>
</body>
</html>
<script src="node_modules/jquery/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
    $.ajax({
        type: "get",
        url: "http://127.0.0.1:3311/get",
        data: {},
        success: function (data) {
            // console.log(data);
            var arr = JSON.parse(data)["T1348647853363"];
            jie(arr);
            console.log(arr)

        }
    })

    function jie(arr) {
        new Vue({
            el: "#root",
            data: {
                arr: arr,

            },
            //    函数
            methods: {


            },
        })
    }

</script>

